﻿//主框架安全
var MainSafe = function () {
    var re = new JsonRequest();
    Ext.Ajax.request({
        url: Ext.getClassUrl('BaseManager.MainView', 'CheckUserLogin'),
        jsonData: re,
        success: function (re, op) {
            var obj = Ext.decode(re.responseText);
            if (obj.ResponseObject != "L") {
                window.location = "index.aspx";
            }
        }
    });
}

//内页安全
var PageSafe = function () {
    var re = new JsonRequest();
    Ext.Ajax.request({
        url: Ext.getClassUrl('BaseManager.MainView', 'CheckUserLogin'),
        jsonData: re,
        success: function (re, op) {
            var obj = Ext.decode(re.responseText);
            if (obj.ResponseObject != "L") {
                top.window.location = "../index.aspx";
            }
        }
    });
}